package com.huazhen.itrip.biz.service.comment;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huazhen.itrip.beans.pojo.ItripComment;
import com.huazhen.itrip.beans.vo.comment.ItripListCommentVO;
import com.huazhen.itrip.beans.vo.comment.ItripScoreCommentVO;
import com.huazhen.itrip.dao.comment.ItripCommentMapper;
@Service("ItripCommentService")
public class ItripCommentServiceImpl implements ItripCommentService {
	@Autowired
	private ItripCommentMapper itripCommentMapper;
	@Override
	public ItripComment getItripCommentById(Long id) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.getItripCommentById(id);
	}

	@Override
	public List<ItripListCommentVO> getItripCommentListByMap(Map<String, Object> param) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.getItripCommentListByMap(param);
	}

	@Override
	public Integer getItripCommentCountByMap(Map<String, Object> param) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.getItripCommentCountByMap(param);
	}

	@Override
	public Long insertItripComment(ItripComment itripComment) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.insertItripComment(itripComment);
	}

	@Override
	public Integer updateItripComment(ItripComment itripComment) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.updateItripComment(itripComment);
	}

	@Override
	public Integer deleteItripCommentById(Long id) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.deleteItripCommentById(id);
	}

	//未实现这方法
	public Long insert(ItripComment record) {
		// TODO Auto-generated method stub
		return itripCommentMapper.insert(record);
	}

	//未实现这方法
	public ItripScoreCommentVO getCommentAvgScore(Long hotelId) throws Exception {
		// TODO Auto-generated method stub
		return itripCommentMapper.getCommentAvgScore(hotelId);
	}

}
